class scoreboard extends uvm_scoreboard;
    uvm_tlm_analysis_fifo #(i2c_trans)  fifo_before;
    i2c_trans trans_before;
    i2c_trans trans_after;

    int err_cnt;
    bit[31:0] reg_version = 32'h20180224;
    bit[31:0] dma_addr    = 32'b0;
    bit[31:0] dma_len     = 32'hffff;
    `uvm_component_utils(scoreboard)

    function new(string name, uvm_component parent);
        super.new(name, parent);
        `uvm_info("TRACE", $sformatf("%m"), UVM_HIGH)
    endfunction

    virtual function void build_phase(uvm_phase phase);
        super.build_phase(phase);
        `uvm_info("TRACE", $sformatf("%m"), UVM_HIGH)
        fifo_before = new("fifo_before", this);
    endfunction

    virtual task  main_phase(uvm_phase phase);
        super.main_phase(phase);
        `uvm_info("TRACE", $sformatf("%m"), UVM_HIGH)
        forever begin
            fifo_before.get(trans_before);
            $cast(trans_after,trans_before.clone());
            case(trans_after.kind)
                i2c_trans::READ :begin
                    case(trans_after.addr)

                    endcase
                end
                i2c_trans::WRITE:begin
                    case(trans_after.addr)

                    endcase
                end
            endcase
        end
    endtask

endclass